package com.bloveoacom.weight;

import android.content.Context;
import android.graphics.Canvas;
import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;

import com.bloveoacom.util.CenterDrawableHelper;



/**
 * author: zhu.px
 * e-mail: 1271901673@qq.com
 * time  : 2018/5/29
 * desc  : drawableLeft与文本一起居中显示
 */
public class DrawableCenterTextView extends AppCompatTextView {

    public DrawableCenterTextView(Context context) {
        super(context);
    }

    public DrawableCenterTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        CenterDrawableHelper.preDraw(this, canvas);
        super.onDraw(canvas);
    }
}
